export const screenLists = [
  {
    title: "船舶类型",
    prop: "vesselType",
    type: "value",
    options: [
      {
        name: "散货船",
        type: 1,
        value: "70"
      },
      {
        name: "集装箱船",
        type: 2,
        value: "75"
      },
      {
        name: "油轮",
        type: 3,
        value: "80" // 
      },
      {
        name: "拖轮/引航船",
        type: 4,
        value: "31" // 
      },
      {
        name: "渔船",
        type: 5,
        value: "30" // 
      },
      {
        name: "客船",
        type: 6,
        value: "60" // 
      },
      {
        name: "其他",
        type: 7,
        value: "other"
      }
    ]
  },
  {
    title: "船舶长度",
    prop: "length",
    type: "range",
    options: [
      {
        name: "0-40",
        type: 1,
        min: 0,
        max: 40,
      },
      {
        name: "41-80",
        type: 2,
        min: 40,
        max: 80,
      },
      {
        name: "81-120",
        type: 3,
        min: 80,
        max: 120,
      },
      {
        name: "121-160",
        type: 4,
        min: 120,
        max: 160,
      },
      {
        name: "161-240",
        type: 5,
        min: 160,
        max: 240,
      },
      {
        name: "241-320",
        type: 6,
        min: 240,
        max: 320,
      },
      {
        name: "大于320",
        type: 7,
        min: 320,
        max: 9999,
      }
    ]
  },
  {
    title: "船舶航速",
    prop: "sog",
    type: "value",
    options: [
      {
        name: "静止",
        type: 1,
        value: 0
      },
      {
        name: "在航",
        type: 2,
        value: "other"
      },
    ]
  },
]

let typeObj = {}
for (let item of screenLists) {
  typeObj[item.prop] = {
    type: item.type,
    options: {}
  }
  for (let t of item.options) {
    if (t.value === "other") {
      t.range = item.options.slice(0, item.options.length - 1).map(m => m.value)
    }
    typeObj[item.prop].options[t.type] = t
  }
}
export const screenObj = { ...typeObj }